package com.f21.f21assessoria.model.modalidade;

import java.io.Serializable;

import javax.persistence.EmbeddedId;
import javax.persistence.Entity;

import com.f21.f21assessoria.model.cadastro.Usuario;

@Entity
public class TurmaProf implements Serializable {

	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private TurmaProfPK turmaProfPK;

	public TurmaProf() {
		this.turmaProfPK = new TurmaProfPK();
	}

	public Usuario getProfessor() {
		return turmaProfPK.getProfessor();
	}

	public Turma getTurma() {
		return turmaProfPK.getTurma();
	}

	public void setProfessor(Usuario professor) {
		turmaProfPK.setProfessor(professor);
	}

	public void setTurma(Turma turma) {
		turmaProfPK.setTurma(turma);
	}

	public TurmaProfPK getTurmaProfPK() {
		return turmaProfPK;
	}

	public void setTurmaProfPK(TurmaProfPK turmaProfPK) {
		this.turmaProfPK = turmaProfPK;
	}

	@Override
	public boolean equals(Object obj) {
		TurmaProf tp = (TurmaProf) obj;

		return this.turmaProfPK.equals(tp.turmaProfPK);
	}

}
